home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2006 April / DPPRO0406DVD.ISO / Essentials / Programming / Eclipse SDK / eclipse-SDK-3.1.1-win32.exe / eclipse / plugins / org.eclipse.help.webapp_3.1.0 / basic / tocView.jsp < prev    next >
Encoding:
Text File  |  2005-09-29  |  2.0 KB  |  80 lines

  1. <%--
  2.  Copyright (c) 2000, 2004 IBM Corporation and others.
  3.  All rights reserved. This program and the accompanying materials 
  4.  are made available under the terms of the Eclipse Public License v1.0
  5.  which accompanies this distribution, and is available at
  6.  http://www.eclipse.org/legal/epl-v10.html
  7.  
  8.  Contributors:
  9.      IBM Corporation - initial API and implementation
  10. --%>
  11. <%@ include file="header.jsp"%>
  12. <% 
  13.     TocData data = new TocData(application,request, response);
  14.     WebappPreferences prefs = data.getPrefs();
  15. %>
  16.  
  17. <html>
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  20.  
  21. <title><%=ServletResources.getString("Content", request)%></title>
  22.  
  23. <base target="ContentViewFrame">
  24. </head>
  25.  
  26.  
  27. <body dir="<%=direction%>" bgcolor="<%=prefs.getBasicViewBackground()%>">
  28. <table border="0" cellpadding="0" cellspacing="0">
  29. <%
  30.     for (int toc=0; toc<data.getTocCount(); toc++) {
  31.         boolean isSelected =data.getSelectedToc() != -1 &&
  32.                        data.getTocHref(data.getSelectedToc()).equals(data.getTocHref(toc));
  33.         //if(!data.isEnabled(toc) && !isSelected){
  34.             // do not show
  35.         //    continue;
  36.         //}
  37.         String icon = isSelected ?
  38.                         prefs.getImagesDirectory()+"/toc_open.gif" :
  39.                         prefs.getImagesDirectory()+"/toc_closed.gif";
  40.         String alt = isSelected ?
  41.                         ServletResources.getString("bookOpen", request) :
  42.                         ServletResources.getString("bookClosed", request) ;
  43. %>
  44.     <tr>
  45.         <td align='<%=isRTL?"right":"left"%>' nowrap>
  46. <%
  47.         if(isSelected){
  48. %>
  49.             <b><img src="<%=icon%>" alt="<%=alt%>"><a href="<%=data.getTocDescriptionTopic(toc)%>" target="ContentViewFrame"> <%=data.getTocLabel(toc)%></a></b>
  50. <%
  51.         }else{
  52. %>
  53.             <b><img src="<%=icon%>" alt="<%=alt%>"><a href="<%="tocView.jsp?toc="+data.getTocHref(toc)%>" target='_self'> <%=data.getTocLabel(toc)%></a></b>
  54. <%
  55.         }
  56. %>
  57.         </td>
  58.     </tr>
  59. <%
  60.         // Only generate the selected toc
  61.         if (isSelected) {
  62. %>        
  63.     <tr>
  64.         <td align='<%=isRTL?"right":"left"%>' nowrap>
  65.             <ul>
  66. <%
  67.             data.generateBasicToc(toc, out);
  68. %>        
  69.             </ul>
  70.         </td>
  71.     </tr>
  72. <%
  73.         }
  74.     }
  75. %>        
  76. </table>
  77. </body>
  78. </html>
  79.  
  80.